typedef struct arcnode
{
	int adj;
	struct arcnode *next;
}arcnode;
typedef struct node
{
	int data;
	arcnode *first;
};
typedef struct graph
{
	struct node edges[maxsize];
	int n,e;
}graph;
int visit[maxsize]={0};
void DFS(graph g,int v,int u,bool &reach)
{
	if(v==u)
	{
		reach=true;
		return;
	}
	visit[v]=1;
	// arcnode *p=g.edges[v].first;
	// while(p!=NULL)
	// {
	// 	if(visit[p->adj]==0&&reach==false)
	// 	{
	// 		DFS(g,p->adj,u,reach);
	// 	}
	// 	p=p->next;
	// }
	for(arcnode *p=g.edges[v].first;p!=NULL;p=p->next){
		if(visit[p->adj]==0&&reach==false){
			DFS(g,p->adj,reach);
		}
	}
}
